import { Menu, Operation } from "@/api/api.model";

export const PowerOperationMap = {
	[Operation.SHOW]: { name: "查看", color: "pink" },
	[Operation.ADD]: { name: "新增", color: "red" },
	[Operation.UPDATE]: { name: "修改", color: "orange" },
	[Operation.DELETE]: { name: "删除", color: "green" },
	[Operation.IMPORT]: { name: "导入", color: "cyan" },
	[Operation.EXPORT]: { name: "导出", color: "blue" },
};

/**
 * 菜单返回的字段
 */
export const Menu_AllFields: DotNotation<Menu>[] = [
	'_id',
	'name',
	'title',
	'icon',
	'badge',
	'target',
	'path',
	'component',
	'renderMenu',
	'parent',
	'permission',
]
